﻿using System;
using System.Runtime.Serialization;


namespace YunBox2.Contracts.Core
{
    [DataContract]
    public class BillBase : BizObject
	{
		#region Status
		[DataMember]
        private DateTime? _approved;

        [DataMember]
        private User _approvedUser;

        [DataMember]
        private DateTime? _audited;

        [DataMember]
        private User _auditedUser;

      

        [DataMember]
        private DateTime _created;

        [DataMember]
        private User _createdUser;

   

        [DataMember]
        private DateTime? _invalid;

        [DataMember]
        private User _invalidUser;

        [DataMember]
        private bool _isApproved;

        [DataMember]
        private bool _isAudited;

        [DataMember]
        private bool _isDraft;

        [DataMember]
        private bool _isInvalid=true;

        [DataMember]
        private bool _isSubmited;



      

        [DataMember]
        private DateTime? _submited;

        [DataMember]
        private User _submitedUser;


		

        public virtual bool IsDraft
        {
            get
            {
                return _isDraft;
            }
            set
            {
                _isDraft = value;
            }
        }

        public virtual DateTime CreatedTime
        {
            get
            {
                return _created;
            }
            set
            {
                _created = value;
            }
        }

        public virtual User CreatedUser
        {
            get
            {
                return _createdUser;
            }
            set
            {
                _createdUser = value;
            }
        }

        public virtual bool IsSubmited
        {
            get
            {
                return _isSubmited;
            }
            set
            {
                _isSubmited = value;
            }
        }

        public virtual DateTime? SubmitedTime
        {
            get
            {
                return _submited;
            }
            set
            {
                _submited = value;
            }
        }

        public virtual User SubmitedUser
        {
            get
            {
                return _submitedUser;
            }
            set
            {
                _submitedUser = value;
            }
        }

        public virtual bool IsAudited

        {
            get
            {
                return _isAudited;
            }
            set
            {
                _isAudited = value;
            }
        }

        public virtual DateTime? AuditedTime
        {
            get
            {
                return _audited;
            }
            set
            {
                _audited = value;
            }
        }

        public virtual User AuditedUser
        {
            get
            {
                return _auditedUser;
            }
            set
            {
                _auditedUser = value;
            }
        }

        public virtual bool IsApproved
        {
            get
            {
                return _isApproved;
            }
            set
            {
                _isApproved = value;
            }
        }

        public virtual DateTime? ApprovedTime
        {
            get
            {
                return _approved;
            }
            set
            {
                _approved = value;
            }
        }

        public virtual User ApprovedUser
        {
            get
            {
                return _approvedUser;
            }
            set
            {
                _approvedUser = value;
            }
        }

        public virtual bool IsInvalid
        {
            get
            {
                return _isInvalid;
            }
            set
            {
                _isInvalid = value;
            }
        }

        public virtual DateTime? InvalidTime
        {
            get
            {
                return _invalid;
            }
            set
            {
                _invalid = value;
            }
        }

        public virtual User InvalidUser
        {
            get
            {
                return _invalidUser;
            }
            set
            {
                _invalidUser = value;
            }
		}
		#endregion

		#region Order编号相关
		[DataMember]
		private string _serialNo;
		public virtual string SerialNo
		{
			get
			{
				return _serialNo;
			}
			set
			{
				_serialNo = value;
			}
		}


	    #endregion
		#region 业务日期
		[DataMember]
		private DateTime _happenDate;

		public virtual DateTime HappenDate
		{
			get
			{
				return _happenDate.Date;
			}
			set
			{
				_happenDate = value.Date;
			}
		}
		#endregion
	}
}